<template>
	<view>
		<custom-nav-sq-xcx :isBack="true" currBg="usuallyBg" :needConBlock="true" :delta="delta">
			<block slot="content">{{resTit}}</block>
		</custom-nav-sq-xcx>
		<sq-screen-area :formFlag="true" :needBtnFlag="true">
			<block slot="formRes" class="formRes">
				<sq-result imgSrc="yybsSucc.png" resTxt="预约成功请准时到预约地点办理~" v-if="fromPage == 'yybsRes'"></sq-result>
			</block>
			<block slot="formBtn">
				<button class="comBtn sq hasBorRad" @tap="goBack">确定</button>
			</block>
		</sq-screen-area>
	</view>
</template>

<script>
	import SqScreenArea from "@/components/sq-screen-area";
	import SqResult from './components/SqResult'
	export default {
		components:{
			SqScreenArea,
			SqResult
		},
		data(){
			return{
				resTit:'',
				fromPage:'yybsRes',//yybsRes
				delta:1
			}
		},
		onLoad(option){
			this.fromPage = option.fromPage;
			if(this.fromPage == 'yybsRes'){
				this.resTit = '增加预约办事成功';
				this.delta = 2;
			}
		},
		methods:{
			goBack(){
				uni.navigateBack({
					delta:this.delta
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.formRes{
		height: calc(100% - 120rpx);
		background: $sq-fuf;
		overflow: hidden;
	}
	.comBtn{
		margin: 0 20rpx;
	}
</style>